<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script crossorigin src="https://unpkg.com/react@17/umd/react.development.js"></script>
    <script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"></script>
<!--    用于解析ES6-->
    <script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
    <style>
        .red {
            color: red;
        }
    </style>
</head>
<!--ES6 -->
<!--有状态组件 props-->
<body>
    <div id="app"></div>
    <script type="text/babel">
        class Template extends React.Component {
            //有状态需要 this
            render() {
                return <div>
                    <p>年龄{this.props.age}</p>
                </div>
            }
        }
        ReactDOM.render(<Template age='19'/>,document.getElementById('app'))
    </script>
</body>
</html>